package com.yujn.user.controller;

import com.yujn.common.bean.Result;
import com.yujn.user.bean.UserDO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {

    /**
     * 根据用户ID获取用户
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public Result<UserDO> getUserById(@PathVariable("id") String id){
        UserDO user = new UserDO();
        user.setId(id);
        return Result.success(user);
    }
}
